package indi.flynn.zhouyi.thread;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author fenglin
 * @since 2025/7/6
 */
@Component
public class TaskRunner implements Runnable {
    @Autowired
    private ExampleService exampleService;

    @Override
    public void run() {
        System.out.println("TaskRunner 子线程中访问注入的 service: " + exampleService);
        exampleService.performTask();
    }
}